<#assign EntityMapperUtils = statics["top.cardone.generator.code.util.EntityMapperUtils"]>
DELETE FROM "${entityMapper.tableName}" WHERE
<${r"#"}if cardone.StringUtils.isNotBlank(${(businessCode?uncap_first)!''}Id)>
    ${EntityMapperUtils.getPKS(entityMapper)!'ID'} = :${(businessCode?uncap_first)!''}Id
<${r"#"}elseif cardone.StringUtils.isNotBlank(${(businessCode?uncap_first)!''}Ids)>
    <${r"#"}if cardone.StringUtils.containsAny(${(businessCode?uncap_first)!''}Ids, ",")>
        ${EntityMapperUtils.getPKS(entityMapper)!'ID'} = ANY(string_to_array(:${(businessCode?uncap_first)!''}Ids, ','))
    <${r"#"}else>
        ${EntityMapperUtils.getPKS(entityMapper)!'ID'} = :${(businessCode?uncap_first)!''}Ids
    </${r"#"}if>
<${r"#"}else>
    ${EntityMapperUtils.getPKS(entityMapper)!'ID'} = ''
</${r"#"}if>
